<%@page language="java" pageEncoding="utf-8"%>
<%@taglib uri="/struts-tags" prefix="s" %>
<%@taglib uri="/WEB-INF/tld/frsf.tld" prefix="frsf"%>
<!-- goods/jsp/sys/GoodsSysSupplierGoods/edit.jsp -->
<%@include file="/htmlframe/jsp/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
</head>
<body>
<link rel="stylesheet" type="text/css" href="<%=hf_cssPath%>core.css" />
<form action="" id="EditForm" method="post">
	<input type="hidden" id="id" name="goodsSysSupplierGoods.id" value="${goodsSysSupplierGoods.id}"/>
  <table width="100%" cellspacing="0" class="table">
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_GOODS_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.goodsNo" id="goodsNo" value="${goodsSysSupplierGoods.goodsNo}" disabled="disabled"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_GOODS_NAME %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.goodsName" id="goodsName" value="${goodsSysSupplierGoods.goodsName}" style="width:95%;"disabled="disabled"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_SUPPLIER_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.supplierNo" id="supplierNo" value="${goodsSysSupplierGoods.supplierNo}" disabled="disabled"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_SUPPLIER_NAME %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.supplierName" id="supplierName" value="${goodsSysSupplierGoods.supplierName}" style="width:95%;" disabled="disabled"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_SUPPLIER_GOODS_NO %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.supplierGoodsNo" id="supplierGoodsNo" value="${goodsSysSupplierGoods.supplierGoodsNo}"/></td>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_SUPPLIER_GOODS_NAME %>：</label></th>
	  <td width="35%"><input type="text" name="goodsSysSupplierGoods.supplierGoodsName" id="supplierGoodsName" value="${goodsSysSupplierGoods.supplierGoodsName}" style="width:95%;"/></td>
	</tr>
	<tr>
	  <th width="15%" style="text-align:right"><label><%=com.gcxx.goods.sys.entity.GoodsSysSupplierGoods.ALIAS_IS_DEFAULT %>：</label></th>
	  <td width="35%" >
	  <frsf:select name="goodsSysSupplierGoods.isDefault" id="isDefault" canEdit="false" selectedValue="${goodsSysSupplierGoods.isDefault}" type="1"></frsf:select>
	  </td>
	  <th width="15%" style="text-align:right"><label>是否启用：</label></th>
	  <td width="35%" >
	  <frsf:select name="goodsSysSupplierGoods.isUse" id="isUse" canEdit="false" selectedValue="${goodsSysSupplierGoods.isUse}" type="1"></frsf:select>
	  </td>
	</tr>
	<tr>
	  <td colspan="4" align="center" style="padding-top: 20px;padding-bottom: 10px;">
		<a href="javascript:void(0)" onclick="submitForm()" class="easyui-linkbutton" data-options="iconCls:'icon-save'" style="width:80px">保存</a>&nbsp;&nbsp;&nbsp;&nbsp;
		<a href="javascript:void(0)" onclick="closeMenu()" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" style="width:80px">返回</a>
	  </td>
	</tr>
  </table>
</form>
<script type="text/javascript">
function submitForm(url){
	var submitTime = 0;
	var str = "{" 
		+"\"id\":\"" + $('#id').val() + "\"" + "," 
// 		+"\"goodsNo\":\"" + $('#goodsNo').val() + "\"" + "," 
// 		+"\"goodsName\":\"" + $('#goodsName').val() + "\"" + "," 
// 		+"\"supplierNo\":\"" + $('#supplierNo').val() + "\"" + "," 
// 		+"\"supplierName\":\"" + $('#supplierName').val() + "\"" + "," 
		+"\"supplierGoodsNo\":\"" + $('#supplierGoodsNo').val() + "\"" + "," 
		+"\"supplierGoodsName\":\"" + $('#supplierGoodsName').val() + "\"" //+ "," 
// 		+"\"updateUserId\":\"" + $('#updateUserId').val() + "\"" + "," 
// 		+"\"updateUserName\":\"" + $('#updateUserName').val() + "\"" + "," 
// 		+"\"updateTime\":\"" + $('#updateTime').val() + "\"" + "," 
// 		+"\"isDefault\":\"" + $('#isDefault').val() + "\"" 
		+ "}";
	submitTime++;
	$.ajax({ 
		type : "POST", 
		dataType : "json", 
		url:j_basePath + 'goods/goodsSysSupplierGoods_update.do', 
		traditional: true,//在struts2下该属性必须有
		async:false,
		data:{data: str}, 
		success:function(result){
			if(result){
				alert(result.message);
				if(result.opttype == "true"){
					try{
						top.refreshDataGrid();
						}catch(e){}
					top.closeDialog();
				}else{
					submitTime = 0;
				}
			}
		},
		error:function(){
			submitTime = 0;
		}
	});
}
function closeMenu(){
	top.closeDialog();
}
</script>
</body>
</html>